package com.hsf.cloudweb.repository;

import com.hsf.cloudweb.model.UserInfo;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

public interface UserRepository extends CrudRepository<UserInfo,Long> {

    UserInfo findByUserAccount(String userAccount);

    @Modifying
    @Query(value="update tbl_user_info a set a.password=?2 where a.user_account=?1",nativeQuery = true)
    void modifyPassword(String userAccount,String password);

}
